package com.xmm.view;

import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class MusicPane extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2934821846948775617L;

	private JLabel mTitle = new JLabel();
	private JLabel mArtist = new JLabel();
	private JLabel mLength = new JLabel();
	private JLabel mRating = new JLabel();
	private JLabel mLocation = new JLabel();
	private JLabel mAblum = new JLabel();
	private JLabel mDate = new JLabel();
	private JLabel mComment = new JLabel();
	private JLabel mSized = new JLabel();
	
	public MusicPane() {
		super();
		
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		init();
	}
	
	private void init() {
		add(mTitle);
		add(mArtist);
		add(mLength);
		add(mRating);
		add(mLocation);
		add(mAblum);
		add(mDate);
		add(mComment);
		add(mSized);
	}
	
	public void setTitle(String title) {
		if(title == null) {
			mTitle.setText("Title: ");
		} else {
			mTitle.setText("Title: " + title);
		}
	}
	public void setArtist(String artist) {
		if(artist == null) {
			mArtist.setText("Artist: ");
		} else {
			mArtist.setText("Artist: " + artist);
		}
	}
	public void setLength(String length) {
		if(length == null) {
			mLength.setText("Length: ");
		} else {
			mLength.setText("Length: " + length + "s");
		}
	}
	public void setRating(String rating) {
		if(rating == null) {
			mRating.setText("Rating: ");
		} else {
			mRating.setText("Rating: " + rating);
		}
	}
	public void setMLocation(String location) {
		if(location == null) {
			mLocation.setText("Location: ");
		} else {
			mLocation.setText("Location: " + location);
		}
	}
	public void setAblum(String ablum) {
		if(ablum == null) {
			mAblum.setText("Ablum: ");
		} else {
			mAblum.setText("Ablum: " + ablum);
		}
	}
	public void setDate(String date) {
		if(date == null) {
			mDate.setText("Date: ");
		} else {
			mDate.setText("Date: " + date);
		}
	}
	public void setComment(String comment) {
		if(comment == null) {
			mComment.setText("Comment: ");
		} else {
			mComment.setText("Comment: " + comment);
		}
	}
	public void setSized(String sized) {
		if(sized == null) {
			mSized.setText("Size: ");
		} else {
			mSized.setText("Size: " + sized + "B");
		}
	}
}
